

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Shape Attributes [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Shape Scripts,Shape Scripts Shape Attributes,Shape Attributes,Shape Attributes Shape Scripts,Shape,Shape Attributes">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Shape Attributes</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="syntax_grammar.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="drawing_methods.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText" style="font-style: italic;">syntax: attribute &quot;=&quot; value &quot;;&quot;</span></p>
<p class="p_BodyText"><span class="f_BodyText">example:</span></p>
<p class="p_Code"><span class="f_Code">shape main</span></p>
<p class="p_Code"><span class="f_Code">{</span></p>
<p class="p_Code"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_Code">//Initialisation attributes - must be before drawing commands</span></p>
<p class="p_Code"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_Code">noshadow = &quot;true&quot;;</span></p>
<p class="p_Code"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_Code">h_align = &quot;center&quot;;</span></p>
<p class="p_Code"><span class="f_Code">&nbsp;</span></p>
<p class="p_Code"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_Code">//drawing commands</span></p>
<p class="p_Code"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_Code">rectangle(0,0,100,100);</span></p>
<p class="p_Code"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="f_Code">println(&quot;foo bar&quot;);</span></p>
<p class="p_Code"><span class="f_Code">}</span></p>
<p class="p_Code"><span class="f_Code">&nbsp;</span></p>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 5px 0px 5px 13px;"><table cellspacing="0" cellpadding="0" border="0" style="border: none; border-spacing:0px; border-collapse: collapse;">
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" bgcolor="#e3e6ed" style="width:150px; background-color:#e3e6ed; border: solid 1px #000000;"><p class="p_Tableheader"><span class="f_Tableheader">Attribute Name</span></p>
</td>
<td valign="top" width="62" bgcolor="#e3e6ed" style="width:62px; background-color:#e3e6ed; border: solid 1px #000000;"><p class="p_Tableheader"><span class="f_Tableheader">Type</span></p>
</td>
<td valign="top" width="510" bgcolor="#e3e6ed" style="width:510px; background-color:#e3e6ed; border: solid 1px #000000;"><p class="p_Tableheader"><span class="f_Tableheader">Description</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">bottomAnchorOffset</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">(int,int)</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">When creating a Shape Script for an embedded element (e.g. Port), use this attribute to offset the shape from the bottom edge of its parent.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">For example:</span></p>
<p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">bottomAnchorOffset=</span><span class="f_Tabletext">(</span><span class="f_Tabletext" style="font-weight: bold;">0,-10</span><span class="f_Tabletext">); move embedded element up 10 pixels from the bottom edge</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">dockable</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Makes the shape default to <a href="appearancemenusection.htm#Dockable">dockable</a>, so that it can be aligned with and joined to other elements (both other Shape Scripts and standard elements). You cannot reverse the dockable status with the </span><span class="f_MenuKeyField">Appearance</span><span class="f_Tabletext"> menu option; to change the status, you must edit the Shape Script.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values: </span><span class="f_Tabletext" style="font-weight: bold;">standard</span><span class="f_Tabletext"> or </span><span class="f_Tabletext" style="font-weight: bold;">off</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">editableField</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Defines a shape as an editable region of the element.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">This field impacts element shapes only, line glyphs are not supported.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid Values: </span><span class="f_Tabletext" style="font-weight: bold;">alias</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">name</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">note</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">stereotype</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">endPointY, endPointX</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">integer</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Only used for the reserved target and source shapes for connectors; this point determines where the main connector line connects to the end shapes.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Default: </span><span class="f_Tabletext" style="font-weight: bold;">0</span><span class="f_Tabletext"> and</span><span class="f_Tabletext" style="font-weight: bold;"> 0</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">fixedAspectRatio</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Set to </span><span class="f_Tabletext" style="font-weight: bold;">true</span><span class="f_Tabletext"> to fix the aspect ratio. Do not use if you do not want to fix the aspect ratio.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">h_Align</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Affects horizontal placement of printed text and subshapes depending on the </span><span class="f_Tabletext" style="font-weight: bold;">layoutType</span><span class="f_Tabletext"> attribute.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values: </span><span class="f_Tabletext" style="font-weight: bold;">left</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">center</span><span class="f_Tabletext">, or </span><span class="f_Tabletext" style="font-weight: bold;">right</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">layoutType</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Determines how subshapes are sized and positioned. See <a href="sub_shapes.htm">Subshape Layout</a> for further details.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values: </span><span class="f_Tabletext" style="font-weight: bold;">leftright</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">topdown</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">border</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">leftAnchorOffset</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">(int,int)</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">When creating a Shape Script for an embedded element (e.g. Port), use this attribute to offset the shape from the left edge of its parent.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">For example: </span></p>
<p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">leftAnchorOffset=</span><span class="f_Tabletext">(</span><span class="f_Tabletext" style="font-weight: bold;">10,0</span><span class="f_Tabletext">); move embedded element right 10 pixels from the left edge</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">noShadow</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Set to </span><span class="f_Tabletext" style="font-weight: bold;">true</span><span class="f_Tabletext"> to suppress the shapes shadow from being rendered.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values: </span><span class="f_Tabletext" style="font-weight: bold;"> true</span><span class="f_Tabletext"> or </span><span class="f_Tabletext" style="font-weight: bold;">false </span><span class="f_Tabletext"> (default= </span><span class="f_Tabletext" style="font-weight: bold;">false</span><span class="f_Tabletext">)</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">orientation</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Applies to decoration shapes only. Determines where the decoration is positioned within the containing element glyph.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values: </span><span class="f_Tabletext" style="font-weight: bold;">NW</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">N</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">NE</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">E</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">SE</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">S</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">SW</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">W</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">preferredHeight</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">&nbsp;</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Used by </span><span class="f_Tabletext" style="font-weight: bold;">border</span><span class="f_Tabletext"> layoutType - north and south</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Used in drawing the source and target shapes for connectors to determine how wide the line is.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">preferredWidth</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">&nbsp;</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Used by </span><span class="f_Tabletext" style="font-weight: bold;">border</span><span class="f_Tabletext"> layoutType - east and west.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Used by </span><span class="f_Tabletext" style="font-weight: bold;">leftright</span><span class="f_Tabletext"> layoutType, shapes where </span><span class="f_Tabletext" style="font-style: italic;">scalable</span><span class="f_Tabletext"> is </span><span class="f_Tabletext" style="font-weight: bold;">false</span><span class="f_Tabletext"> to determine how much space they occupy for layout purposes.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">rightAnchorOffset</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">(int,int)</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">When creating a Shape Script for an embedded element (e.g. Port), use this attribute to offset the shape from the right edge of its parent.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">For example:</span></p>
<p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">rightAnchorOffset=</span><span class="f_Tabletext">(-</span><span class="f_Tabletext" style="font-weight: bold;">10,0</span><span class="f_Tabletext">); move embedded element left 10 pixels from the right edge</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">rotatable</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Set to </span><span class="f_Tabletext" style="font-weight: bold;">false</span><span class="f_Tabletext"> to prevent rotation of the shape. This attribute is only applicable to the source and target shapes for lines glyphs.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values: </span><span class="f_Tabletext" style="font-weight: bold;">true</span><span class="f_Tabletext"> or</span><span class="f_Tabletext" style="font-weight: bold;"> false </span><span class="f_Tabletext">(default = </span><span class="f_Tabletext" style="font-weight: bold;">true</span><span class="f_Tabletext">)</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">scalable</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Set to </span><span class="f_Tabletext" style="font-weight: bold;">false</span><span class="f_Tabletext"> to stop the shape from being relatively sized to the associated diagram glyph.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values: </span><span class="f_Tabletext" style="font-weight: bold;"> true</span><span class="f_Tabletext"> or </span><span class="f_Tabletext" style="font-weight: bold;">false </span><span class="f_Tabletext"> (default= </span><span class="f_MenuKeyField">true</span><span class="f_Tabletext">)</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">topAnchorOffset</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">(int,int)</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">When creating a Shape Script for an embedded element (e.g. Port), use this attribute to offset the shape from the top edge of its parent.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">For example:</span></p>
<p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">topAnchorOffset=</span><span class="f_Tabletext">(</span><span class="f_Tabletext" style="font-weight: bold;">0,10</span><span class="f_Tabletext">); move embedded element down 10 pixels from the top edge</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="150" style="width:150px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-weight: bold;">v_Align</span></p>
</td>
<td valign="top" width="62" style="width:62px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext" style="font-style: italic;">string</span></p>
</td>
<td valign="top" width="510" style="width:510px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Affects vertical placement of printed text and subshapes depending on the </span><span class="f_Tabletext" style="font-weight: bold;">layoutType</span><span class="f_Tabletext"> attribute.</span></p>
<p class="p_Tabletext"><span class="f_Tabletext">Valid values:</span><span class="f_Tabletext"> </span><span class="f_Tabletext" style="font-weight: bold;">top</span><span class="f_Tabletext">, </span><span class="f_Tabletext" style="font-weight: bold;">center</span><span class="f_Tabletext">, or </span><span class="f_Tabletext" style="font-weight: bold;">bottom</span></p>
</td>
</tr>
</table>
</div>




            </div>
          </div>
        </div>



</div>


</body>
</html>
